#ifndef LOGININTERFACE_H
#define LOGININTERFACE_H

#include <QWidget>
#include <QNetworkAccessManager>
#include <QNetworkReply>

class MainWindow;

namespace Ui {
class LoginInterface;
}

class LoginInterface : public QWidget
{
    Q_OBJECT

public:
    explicit LoginInterface(QWidget *parent = nullptr);
    ~LoginInterface();

    void clearPassword();//清除密码输入框

private slots:
    void timer();

    void requestFinished(QNetworkReply *reply);   //初始化获取http返回id码槽函数

    void on_pushButton_clicked();//点击了登入按钮

    void on_pushButton_2_clicked();


    void on_lineEdit_returnPressed();

    void on_lineEdit_2_returnPressed();

    void on_lineEdit_textChanged(const QString &arg1);

    void on_lineEdit_2_textChanged(const QString &arg1);

    void on_pushButton_3_clicked();

private:
    void initialize();//初始化界面
    bool eventFilter(QObject *watched, QEvent *event);   //事件过滤

private:
    QTimer *mytimer;
    Ui::LoginInterface *ui;

    MainWindow *w;//主窗口对象
    QByteArray bytes;//http返回id码
    QNetworkAccessManager naManager;

    bool ifclick = false;//记录判断是否可以点击登入按钮
    bool ifWin = false;//判断是否进入主窗口
    bool Password_conceal = false;//标志位判断是否需要隐藏密码

};

#endif // LOGININTERFACE_H
